<?php if (!defined('THINK_PATH')) exit(); /*a:2:{s:85:"/data/www/html/web2017/public_html/../application/index/view/user/article_column.html";i:1498527604;s:72:"/data/www/html/web2017/public_html/../application/index/view/footer.html";i:1505293149;}*/ ?>
<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
    <title>个人主页</title>
    <!-- 最新版本的 Bootstrap 核心 CSS 文件 -->
    <!--<link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">-->
    <link rel="stylesheet" href="__STATIC__/style/weui.min.css">
    <link rel="stylesheet" href="__STATIC__/style/cmgd.css">
    <script src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
    <!--奥森图标-->
    <link rel="stylesheet" href="__STATIC__/style/FontAwesome_4.2.0/css/font-awesome.min.css">
    <script src="/static/admin/js/laypage/laypage.js"></script>
    <script src="/static/admin/js/laytpl/laytpl.js"></script>
    <script type="text/javascript" src="__STATIC__/admin/js/layer/layer.js" ></script>
    <style>
        .text{padding-left:9px; }
        .fa-list-ul{padding-right:3px;}
        .weui-media-box__desc img{width:22px;height:22px;}
        .weui-grid__icon {width:95%; }

        .weui-navbar_userA{
            display: -webkit-box;
            display: -webkit-flex;
            z-index: 100;
        }
        .weui-search-bar{
            position: relative;
        }
        .bg {
            background: url('/uploads/face/<?php echo $user['head_img']; ?>');
            height:250px;
            text-align: center;
            /*line-height: 200px;*/
        }
        .bg-blur {
            float: left;
            width: 100%;
            background-repeat: no-repeat;
            background-position: center;
            background-size: cover;
            -webkit-filter: blur(15px);
            -moz-filter: blur(15px);
            -o-filter: blur(15px);
            -ms-filter: blur(15px);
            filter: blur(15px);
        }
        #guanzhu{width:100px;height: 30px;line-height:30px;border:1px #ccc solid;padding: 3px 15px;border-radius: 5px;}
        .content-front {
            position:absolute;
            left: 50px;
            right: 50px;
            height:250px;
            /*line-height: 200px;*/
            text-align: center;
            color: #ffffff;
            font-size: 13px;
        }

        .content-front img{
            border-radius: 60px;
            width: 60px;
            height: 60px;
            margin-top: 50px;
            z-index: 0;
        }
        .content-front .name{
            font-size: 17px;
        }

        .weui-navbar{top:0px;}
        .weui-navbar+.weui-tab__panel{padding-top:55px;}
        .username{font-size:15px;color:#000;}
    </style>
</head>
<body>

<div class="container" id="container">

    <div class="page home js_show">
        <div class="page__bd" style="height: 100%;">
            <div class="weui-tab" id="navbar">
                <div class="weui-navbar">
                    <?php if(!empty($user_column)): ?>
                    <!--<div class="weui-navbar__item ">个人动态</div>-->
                    <div class="weui-navbar__item  <?php if($type==0): ?>  weui-bar__item_on<?php endif; ?>" id="0" >全部</div>
                    <?php if(is_array($user_column) || $user_column instanceof \think\Collection || $user_column instanceof \think\Paginator): if( count($user_column)==0 ) : echo "" ;else: foreach($user_column as $key=>$vv): ?>
                    <div class="weui-navbar__item   <?php if($type==$vv['id']): ?>  weui-bar__item_on<?php endif; ?>  " id="<?php echo $vv['id']; ?>"><?php echo $vv['user_column']; ?></div>
                    <?php endforeach; endif; else: echo "" ;endif; endif; ?>
                </div>
                <div class="weui-tab__panel">
                    <div id="wzzx">
                        <div class="weui-panel articlelist">
                            <div class="page__bd" >

                                <div class="weui-panel weui-panel_access">
                                    <!--<div class="weui-panel__hd" style="font-size:16px;color: #000;"><i class="fa fa-list-ul"></i>普通文章列表</div>-->
                                    <div class="weui-panel__bd">
                                        <script id="list-template" type="text/html">
                                        {{# for(var i=0;i<d.length;i++){  }}
                                        <a href="/index/index/article_detail/id/{{d[i].id}}.html" class="weui-media-box weui-media-box_appmsg">
                                            {{# if(d[i].photo!=''){ }}
                                            <div class="weui-media-box__hd">
                                                <img class="weui-media-box__thumb" src="/uploads/images/{{d[i].photo}}" height="100%" alt="">
                                            </div>
                                            {{# } }}
                                            <div class="weui-media-box__bd">
                                                <h4 class="weui-media-box__title">{{d[i].title}}</h4>
                                                <p class="weui-media-box__desc" >{{d[i].author}} &nbsp;&nbsp;&nbsp;&nbsp; {{d[i].create_time}}</p>
                                            </div>
                                        </a>
                                        {{# } }}
                                        </script>
                                        <div id="list-content"></div>
                                    </div>
                                </div>
                            </div>


                        </div>


                    </div>

                </div>
            </div>

        </div>
    </div>

    <div class="weui-tabbar footer" >
    <a href="<?php echo url('index/index'); ?>" class="weui-tabbar__item <?php if($footfrom ==1): ?>weui-bar__item_on <?php endif; ?>">
                        <span style="display: inline-block;position: relative;">
                            <i class="fa fa-home weui-tabbar__icon   "></i>
                        </span>
        <p class="weui-tabbar__label">首页</p>
    </a>
    <a href="<?php echo url('usercenter/dynamic'); ?>" class="weui-tabbar__item <?php if($footfrom ==2): ?>weui-bar__item_on <?php endif; ?>">
                        <span style="display: inline-block;position: relative;">
                            <i class="fa fa-comments weui-tabbar__icon " ></i>
                            <!--<span class="weui-badge weui-badge_dot" style="position: absolute;top: 0;right: -6px;"></span>-->
                        </span>
        <p class="weui-tabbar__label">我的圈子</p>
    </a>
    <a href="<?php echo url('usercenter/index'); ?>" class="weui-tabbar__item <?php if($footfrom==3): ?>weui-bar__item_on <?php endif; ?>">
                        <span style="display: inline-block;position: relative;">
                            <i class="fa fa-user weui-tabbar__icon"></i>
                            <!--<span class="weui-badge" style="position: absolute;top: -2px;right: -6px;">8</span>-->
                        </span>
        <p class="weui-tabbar__label">我的</p>

    </a>
</div>   

<script type="text/javascript">
    $(function(){
        $('.weui-tabbar__item').on('click', function () {
            $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
        });
    });
</script>

</div>
</body>

<script type="text/javascript">
    var type = '<?php echo $type; ?>';
    Ajaxpage(type);

    function Ajaxpage(type){
        var user_id = '<?php echo $user['id']; ?>';
        $.post('<?php echo url("user/article_column"); ?>', {user_id:user_id,type:type,page:1}, function(data){
            //  $(".spiner-example").css('display','none'); //数据加载完关闭动画
             console.log(data);
            if(data==''){
                // $("#list-content").html('<td colspan="20" style="padding-top:10px;padding-bottom:10px;font-size:16px;text-align:center">暂无数据</td>');
            }else{
                var tpl = document.getElementById('list-template').innerHTML;
                laytpl(tpl).render(data.list, function(html){
                    // document.getElementById('list-content').innerHTML = html;
                    $('#list-content').html(html);
                    $('.weui-grid__icon').css('height',$('.weui-grid__icon').css('width'));

                });
            }
        });

    }

    //点赞
    function thumbsUp(id,obj){

        var t = '#zan_'+id;
        count = $(t).html();
        $.post('<?php echo url("usercenter/dynamic_zan"); ?>',
                {id:id},
                function(data){
                    if(data.code==11){
                        layer.msg(data.msg,{icon:5,time:1500,shade: 0.1,});
                        window.location.href="<?php echo url('user/login'); ?>";
                    }else {

                        count = parseInt(count);


                        if(data.code==1){
                            count = count+1;
                            $('#zan_'+id).removeClass('fa-thumbs-o-up');
                            $('#zan_'+id).addClass('fa-thumbs-up');
                            $('#zan_'+id).html(count);
                        }else{
                            count = count-1;
                            $('#zan_'+id).removeClass('fa-thumbs-up');
                            $('#zan_'+id).addClass('fa-thumbs-o-up');
                            $('#zan_'+id).html(count);
                        }
                    }

                });;







    }

    function comment(id,obj){
        var t = '#pl_'+id;
        var st = $(t).css('display');
        if(st=='none'){
            $('.comment').css('display','none');
            $(t).css('display','block');
        }else{
            $(t).css('display','none');
        }
    }


    function addemoji(i,j){
        var htl = "<img src='/static/emoji/img/"+i+".gif'>";
        $("#comment_"+j).append(htl);
    }



    function shares(id){

        location.href = '/index/usercenter/send_info/share_id/'+id+'.html';
    }

    function showemoji(id){
        var t = '#emoji_'+id;
        var st = $(t).css('display');
        if(st=='none'){
            $('.emoji').css('display','none');
            $(t).css('display','block');
        }else{
            $(t).css('display','none');
        }
    }




    $(function(){

        var $searchBar = $('#searchBar'),
                $searchResult = $('#searchResult'),
                $searchText = $('#searchText'),
                $searchInput = $('#searchInput'),
                $searchClear = $('#searchClear'),
                $searchCancel = $('#searchCancel');

        function hideSearchResult(){
            $searchResult.hide();
            $searchInput.val('');
        }
        function cancelSearch(){
            hideSearchResult();
            $searchBar.removeClass('weui-search-bar_focusing');
            $searchText.show();
        }

        $searchText.on('click', function(){
            $searchBar.addClass('weui-search-bar_focusing');
            $searchInput.focus();
        });
        $searchInput
                .on('blur', function () {
                    if(!this.value.length) cancelSearch();
                })
                .on('input', function(){
                    if(this.value.length) {
                        $searchResult.show();
                    } else {
                        $searchResult.hide();
                    }
                })
        ;
        $searchClear.on('click', function(){
            hideSearchResult();
            $searchInput.focus();
        });
        $searchCancel.on('click', function(){
            cancelSearch();
            $searchInput.blur();
        });
    });
    //顶部导航
    $(function(){
        $('.weui-navbar__item').on('click', function () {
            $(this).addClass('weui-bar__item_on').siblings('.weui-bar__item_on').removeClass('weui-bar__item_on');
            console.log( $(this).attr('id') ) ;

//            var usert = '<?php echo $user['id']; ?>';
//            var type= $(this).attr('id');
//            window.location.href="/index/user/article_column/user_id/"+usert+"/type/"+type+".html";
            Ajaxpage($(this).attr('id'))

        });
    });

    function isfoucs(id){
        $.post('<?php echo url("User/focus_user"); ?>',
                {fans_id:id},
                function(data){
                    if(data.code==11){
                        layer.msg(data.msg,{icon:5,time:1500,shade: 0.1,});
                        window.location.href="<?php echo url('user/login'); ?>";
                    }else{
                        if(data.code==1){
//                            $('#collect').removeClass('fa-heart-o');
//                            $('#collect').addClass('fa-heart');
                            $('#guanzhu').html('已关注');
                            layer.msg(data.msg,{icon:1,time:1500,shade: 0.1,});
                        }else{

                            $('#collect').removeClass('fa-heart');
                            $('#guanzhu').html('关注');
                            layer.msg(data.msg,{icon:5,time:1500,shade: 0.1,});
                        }
                    }
                });
    }



    //    //点赞
    //    function thumbsUp(id,obj){
    //        if($(obj).hasClass('no'))
    //        {
    //            $(obj).removeClass('no').addClass('yes');
    //            $(obj).html("<i class='fa fa-thumbs-up '> 15</i>");
    //        }else if($(obj).hasClass('yes')){
    //            $(obj).removeClass('yes').addClass('no');
    //            $(obj).html("<i class='fa fa-thumbs-o-up'> 14</i>");
    //        }else{ // 其他输入框操作
    //            var value = $(obj).val();
    //        }
    //    }
    //    function comment(id,obj){
    //        $('.comment').toggle(function(){
    //            $('.comment').next().css('display','block');
    //        },function(){
    //            $('.comment').next().css("display","none");
    //        });
    //    }
</script>

</html>